<template>
  <div class="box clearfix" ref="containerRef" @scroll="handleScroll">
    <div :class="[{ disable: isNodata }, 'main']">
      <div class="jfmain clearfix">
        <header>
          <a class="fl logo" href="https://wireai.com/" target="_blank">
            <img :src="`${imgurl}logo_aireai.png`" />
          </a>
          <nav>
            <span class="title" @click="toUrl('/')">
              <i>WIRE AI</i>
            </span>
            <span class="title active" @click="toUrl('/shop')">
              <i>积分商城</i>
            </span>
            <span class="title" @click="toUrl('/member')">
              <i>个人中心</i>
            </span>
            <span class="title" @click="toUrl('/ranklist')">
              <i>积分助力榜</i>
            </span>
          </nav>
        </header>
        <div class="addjf">
          <div class="jfInfo clearfix">
            <span class="show font1">
              <img :src="`${imgurl}font1.png`" />
            </span>
            <span class="tit-1">全新福利好礼入驻<i>积分商城焕新上线</i></span>
          </div>
          <div class="addjfswiper">
            <Swiper
              @swiper="onSwiper"
              @slideChange="onSlideChange"
              :modules="modules"
              :autoplay="{ delay: 3000, disableOnInteraction: false }"
              v-if="topswiper.length > 0"
            >
              <SwiperSlide
                v-for="(item, index) in topswiper"
                :key="index"
                @click="toRank(index + 1)"
              >
                <div class="ranktop">
                  <div class="rank01">
                    <div class="rank_headimg">
                      <div class="hgbz">
                        <img :src="`${imgurl}wangguan02.png`" alt="" />
                      </div>
                      <div class="hgbzimg" v-if="index==1">
                        <img
                          :src="baseurl + item[1].headimg"
                          alt=""
                          v-if="item[1].headimg"
                        />
                        <img :src="`${imgurl}pic.jpg`" v-else />
                      </div>
                      <div class="hgbzimg" v-else >
                        <img
                          :src="baseurl + item[1].headimg"
                          alt=""
                          v-if="item[1].headimg"
                        />
                        <img :src="`${imgshop}logo_1.png`" v-else />
                      </div>
                      <div class="rank_sex">
                        <img
                          :src="`${imgshop}girl.png`"
                          v-if="item[1].sex == '女'"
                        />
                        <img :src="`${imgshop}sex.png`" v-else />
                      </div>
                    </div>
                    <div class="rank_text">
                      <p>{{ item[1].nickname }}</p>
                      <span></span>
                      <div class="jfnumber">{{ item[1].integraltotal }}</div>
                      <div class="jfspan">积分</div>
                    </div>
                  </div>

                  <div class="rank02">
                    <div class="rank02con">
                      <div class="rank_headimg">
                        <div class="hgbz">
                          <img :src="`${imgurl}wangguan01.png`" alt="" />
                        </div>
                        <div class="hgbzimg" v-if="index==1">
                          <img
                            :src="baseurl + item[0].headimg"
                            alt=""
                            v-if="item[0].headimg"
                          />
                          <img :src="`${imgurl}pic.jpg`" v-else />
                        </div>
                        <div class="hgbzimg" v-else>
                          <img
                            :src="baseurl + item[0].headimg"
                            alt=""
                            v-if="item[0].headimg"
                          />
                          <img :src="`${imgshop}logo_0.png`" v-else />
                        </div>
                        <div class="rank_sex">
                          <img
                            :src="`${imgshop}girl.png`"
                            v-if="item[0].sex == '女'"
                          />
                          <img :src="`${imgshop}sex.png`" v-else />
                        </div>
                      </div>
                      <div class="rank_text">
                        <p>{{ item[0].nickname }}</p>
                        <span></span>
                        <div class="jfnumber">{{ item[0].integraltotal }}</div>
                        <div class="jfspan">积分</div>
                      </div>
                    </div>
                  </div>

                  <div class="rank01 rank03">
                    <div class="rank_headimg">
                      <div class="hgbz">
                        <img :src="`${imgurl}wangguan03.png`" alt="" />
                      </div>
                      <div class="hgbzimg" v-if="index==1">
                        <img
                          :src="baseurl + item[2].headimg"
                          alt=""
                          v-if="item[2].headimg"
                        />
                        <img :src="`${imgurl}pic.jpg`" v-else />
                      </div>
                      <div class="hgbzimg" v-else>
                        <img
                          :src="baseurl + item[2].headimg"
                          alt=""
                          v-if="item[2].headimg"
                        />
                        <img :src="`${imgshop}logo_2.png`" v-else />
                      </div>
                      <div class="rank_sex">
                        <img
                          :src="`${imgshop}girl.png`"
                          v-if="item[2].sex == '女'"
                        />
                        <img :src="`${imgshop}sex.png`" v-else />
                      </div>
                    </div>
                    <div class="rank_text">
                      <p>{{ item[2].nickname }}</p>
                      <span></span>
                      <div class="jfnumber">{{ item[2].integraltotal }}</div>
                      <div class="jfspan">积分</div>
                    </div>
                  </div>
                </div>
              </SwiperSlide>
            </Swiper>
            <div class="jfbot">
              <p class="titlep">
                <img :src="`${imgshop}t_left_01.png`" alt="" />
                {{ currIndex == 0 ? "企业助力排行榜" : "个人助力排行榜" }}
                <img :src="`${imgshop}t_left_02.png`" alt="" />
              </p>
              <div class="swiperpage">
                <span
                  class="dto"
                  :class="{ 'dto-active': index === currIndex }"
                  v-for="(item, index) in 2"
                  @click="changeSwiper(index)"
                  :key="index"
                ></span>
              </div>
            </div>
          </div>
        </div>

        <div class="userBox" v-if="isMember">
          <div
            class="userInfo"
            element-loading-text="正在加载..."
            v-loading="loading"
          ></div>
        </div>
        <div class="userBox" v-else>
          <div class="userInfo" v-if="isMobile">
            <div class="info">
              <div class="pic fl" @click="toUrl('/perfect')">
                <img
                  v-if="memberInfo?.headimg"
                  :src="`${baseurl}${memberInfo?.headimg}`"
                />
                <img v-else :src="`${imgurl}pic.png`" />
                <span
                  class="sex show girl"
                  v-if="memberInfo?.sex == '女'"
                ></span>
                <span class="sex show" v-else></span>
              </div>
              <div class="fr cont">
                <span class="icon"
                  >{{ memberInfo?.identity == "丝网买家" ? "买" : "企" }}
                </span>
                <span class="name show" @click="toUrl('/perfect')">{{
                  memberInfo?.nickname
                }}</span>
                <span class="tell show" @click="toUrl('/perfect')">{{
                  maskedPhone(memberInfo?.phone)
                }}</span>
                <span class="name show">{{ memberInfo?.companyname }}</span>
              </div>
              <span class="score show">
                <i>{{ getArea(memberInfo?.integral) }}</i
                >积分
              </span>
            </div>
            <span class="btnEdit show" @click.stop="toUer('/member')"
              >积分账单</span
            >
          </div>
          <div class="userInfo" v-else>
            <div class="fraction">
              <span class="tit-1 show">
                <i>{{ getArea(memberInfo?.integral) }}</i
                >积分
              </span>
              <span class="tit-1 show">{{ memberInfo?.companyname }}</span>
            </div>
            <div class="info">
              <div class="pic fr" @click="toUrl('/perfect')">
                <img
                  v-if="memberInfo?.headimg"
                  :src="`${baseurl}${memberInfo?.headimg}`"
                />
                <img v-else :src="`${imgurl}pic.jpg`" />
                <span
                  class="sex show girl"
                  v-if="memberInfo?.sex == '女'"
                ></span>
                <span class="sex show" v-else></span>
              </div>
              <div class="fr cont">
                <div class="nameuser">
                  <span class="icon"
                    >{{ memberInfo?.identity == "丝网买家" ? "买" : "企" }}
                  </span>
                  <span class="name show" @click="toUrl('/perfect')">{{
                    memberInfo?.nickname
                  }}</span>
                </div>
                <span class="tell show" @click="toUrl('/perfect')">{{
                  maskedPhone(memberInfo?.phone)
                }}</span>
              </div>
            </div>
            <span class="btnEdit show" @click.stop="toUer('/member')"
              >积分账单</span
            >
          </div>
        </div>

        <div class="classBox">
          <div class="classTit" @click="getClass(0)">
            <span class="titCon">超值兑换</span>
          </div>
          <!-- <div :class="[{active:classId == item.id},'classTit'] " v-for="(item,k) in classList" :key="k" >
					<span class="titCon" @click="getClass(item.id)"><i>{{ item.class_name }}</i></span>
				</div> -->
        </div>
        <div class="nodata" v-if="isNodata"></div>
        <div class="list" v-if="list.length > 0">
          <div class="shopItem" @click="toView(item.id)" v-for="item in list">
            <div class="imgT flexC">
              <el-image
                style="width: 100%; height: 100%"
                :src="`${baseurl}${item.coverimg}`"
                :key="`${baseurl}${item.coverimg}`"
                :zoom-rate="1.2"
                fit="cover"
                lazy
                loading
              >
              </el-image>
              <!-- <img :src="`${baseurl}${item.coverimg}`"/> -->
            </div>
            <span class="title show">{{ item.title }}</span>
            <span class="price flexC"
              ><i>{{ item.score }}</i></span
            >
            <span class="btnMore flexC">查看详情</span>
          </div>
        </div>
        <div
          class="list"
          element-loading-text="正在加载..."
          v-loading="loading"
          v-if="isList"
        ></div>
      </div>
    </div>
    <div id="gotop_xxx">
      <ul :class="[{ disable: isHandle }, 'topList']" id="js-go_top">
        <li class="tellcode" @click="playVideo">
          <span class="play"></span>
        </li>
        <li class="topBtn">
          <span class="btntop" @click="scrollToTop"></span>
        </li>
      </ul>
    </div>
    <!-- v-if="isMobile" -->
    <div class="videoBox" v-show="showVideo">
      <div class="bg" @click="playVideo"></div>
      <video class="video" controls ref="videoPlayer">
        <source
          src="http://img.wireai.com/static/images/integralVideo.mp4"
          type="video/mp4"
        />
      </video>
      <span class="close show" @click="playVideo"></span>
    </div>
  </div>
</template>

<script setup lang='ts'>
import { Swiper, SwiperSlide } from "swiper/vue";

import { Autoplay, Pagination, Navigation, Scrollbar } from "swiper";
const modules = [Autoplay, Pagination, Navigation, Scrollbar];
const currIndex = ref<number>(0);
import "swiper/css";
import "swiper/css/navigation";
import "swiper/css/pagination";
import "swiper/css/autoplay";
import { useUserStore } from "@/store/modules/user";
import { useSystemStore } from "@/store/modules/system";

const imgurl = import.meta.env.VITE_APP_TITLE + "/assets/images/";
const imgshop = import.meta.env.VITE_APP_TITLE + "/assets/shop/";
import { useRouter, useRoute } from "vue-router";
import { getArea, maskedPhone } from "../../utils/base.ts";
const userInfo = useUserStore();
const router = useRouter();
const baseurl = inject("$baseurl", null as any);
const isMobile = ref<boolean>(false);
const api = inject("$base", null as any);
const classList = ref<any>();
const classId = ref<number>();
const list = ref<any>([]);
const page = ref<number>(1);
const memberInfo = ref<any>();
const isMember = ref<boolean>(true);
const isList = ref<boolean>(true);
const base = useSystemStore();
const loading = ref(true);
const containerRef = ref(null);
const isPage = ref<boolean>(false);
const isNodata = ref<boolean>(false);
const showVideo = ref<boolean>(false);
const videoPlayer = ref(null);
const isHandle = ref<boolean>(true);
const onSwiper = (swiper) => {
  console.log(swiper);
};
const onSlideChange = (e) => {
  console.log(e);

  console.log(e.activeIndex);

  currIndex.value = e.activeIndex;
};
function changeSwiper(index) {}
const scrollToTop = () => {
  console.log("9999");
  isHandle.value = false;
  const container = containerRef.value;
  container.scrollTo({
    top: 0,
    behavior: "smooth",
  });
  setTimeout(() => {
    isHandle.value = true;
  }, 1000);
};
function playVideo() {
  showVideo.value = !showVideo.value;
  isHandle.value = !isHandle.value;
  if (showVideo.value && videoPlayer.value) {
    videoPlayer.value.play();
  } else {
    videoPlayer.value.pause();
  }
}
function toRank(id) {
  router.push({
    path: `/ranklist`,
    query: { type: id },
  });
}
function toView(id: number) {
  router.push({
    path: `/view`,
    query: { id: id },
  });
}
function toUrl(url) {
  router.push({
    path: url,
  });
}
function toUer(url: string) {
  router.push({
    path: url,
  });
}
function getClass(id: number) {
  classId.value = id;
  page.value = 1;
  list.value = [];
  isList.value = true;
  getList();
}
function getList() {
  if (page.value > 1) {
    isList.value = true;
  }
  let data = {
    page: page.value,
    pagecount:50,
    class_id: classId.value,
  };
  api.goodsindex(data).then((res) => {
    classList.value = res.data.classinfo;
    let arr = res.data.list;
    list.value = [...list.value, ...arr];
    base.productClassid = "";
    isList.value = false;
    if (list.value.length == 0) {
      isNodata.value = true;
    }
    if (res.data.pagecount > page.value * 50) {
      isPage.value = true;
    } else {
      isPage.value = false;
    }
  });
}
function memberinfo() {
  api.memberinfo({ id: userInfo.userIds }).then((res) => {
    memberInfo.value = res.data;
    isMember.value = false;
  });
}
const handleScroll = () => {
  const container = containerRef.value;
  if (container.scrollTop + container.clientHeight >= container.scrollHeight) {
    if (isPage.value) {
      page.value++;
      getList();
    }
  }
};
const topswiper = ref([]);
function getjfranklist(number) {
  api.ranklist({ type: number }).then((res) => {
    topswiper.value = res.data.swptop;
  });
}
onMounted(() => {
  document.title = "WIRE AI积分商城";
  if (base.productClassid) {
    classId.value = base.productClassid;
  }
  memberinfo();
  getList();
  getjfranklist(1);
  const width = window.innerWidth;
  if (width <= 768) {
    isMobile.value = true;
  }
  window.addEventListener("resize", function () {
    const width = window.innerWidth;
    if (width <= 768) {
      isMobile.value = true;
    } else {
      isMobile.value = false;
    }
  });
});
</script>
<style lang="scss" scoped>
.swiperpage {
  display: flex;
  justify-content: center;
  height: 10px;
  width: 100%;
  margin-top: 10px;
  span {
    display: block;
  }
  .dto {
    width: 30px;
    height: 8px;
    border-radius: 10px;
    background: #e5e5e5;
    margin: 0 4px;
  }
  .dto-active {
    background: #2379f7;
    width: 8px;
    border-radius: 8px;
    height: 8px;
  }
}
.addjf {
  width: 100%;
  display: flex;
  justify-content: center;
  .addjfswiper {
    cursor: pointer;
    width: 50%;
    transform: scale(0.8);
    margin-right: 180px;
    transform-origin: right top;
  }
}
.box {
  width: 100%;
  height: 100vh;
  overflow-y: scroll;
  .main {
    background: url(../../assets/images/jfbg.jpg) no-repeat top center #e9f0fa;
    width: 100%;
    padding-bottom: 75px;
    &.disable {
      overflow: hidden;
    }
  }
}
.jfmain {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  color: #333333;
  // overflow:hidden;
}
header {
  width: 100%;
  padding: 0 60px;
  height: 75px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  .logo {
    cursor: pointer;
    display: inline-block;
    height: 25px;
  }
  nav {
    padding: 0 15px;
    float: left;
    height: 100%;
  }
  .title {
    font-size: 16px;
    padding: 0 15px;
    height: 100%;
    float: left;
    cursor: pointer;
    position: relative;
    i {
      font-style: normal;
      display: inline-block;
      height: 100%;
      position: relative;
      font-family: "siyuanR";
      color: #666666;
      height: 100%;
      transition: all 0.5s;
      transform-origin: center;
      align-items: center;
      justify-content: center;
      display: flex;
      &::after {
        position: absolute;
        bottom: 8px;
        content: "";
        left: 50%;
        width: 0;
        height: 4px;
        background-image: linear-gradient(to right, #2379ff, #9cfacd);
        border-radius: 4px;
        transition: all 0.5s;
      }
    }
    &.active {
      i {
        font-family: "siyuanM";
        color: #333333;
        &:after {
          width: 100%;
          left: 0;
        }
      }
    }
    &:hover {
      i {
        color: #2379f7;
      }
    }
  }
}
.jfInfo {
  width: 100%;
  position: relative;
  padding-top: 75px;
  padding-left: 60px;
  .tit-1 {
    font-size: 20px;
    font-family: "siyuanM";
    line-height: 45px;
    position: relative;
    height: 45px;
    display: inline-block;
    i {
      z-index: 10;
      font-style: normal;
      background: linear-gradient(90deg, #2379ff, #0ac1ba);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      color: transparent;
      font-size: 20px;
      margin-left: 5px;
    }
    &::after {
      position: absolute;
      left: 0;
      bottom: 0;
      content: "";
      width: 100%;
      height: 1px;
      background: linear-gradient(to right, #cad2df, #b0c8ef, #b0c8ef);
    }
    &::before {
      position: absolute;
      left: 0;
      bottom: -3px;
      content: "";
      width: 38px;
      height: 7px;
      background: #8d9299;
      z-index: 10;
    }
  }
}
.userBox {
  width: 100%;
  position: relative;
  margin-top: -75px;
  color: #fff;
  &::after {
    // background: url(../../assets/images/bg7.png) no-repeat;
    padding-bottom: 100%;
    width: 134px;
    height: 63px;
    position: absolute;
    left: -37px;
    top: 25px;
    content: "";
  }
}
.userInfo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "siyuanN";
  background: url(../../assets/shop/userbg.png) no-repeat;
  background-size: 100%;
  width: 743px;
  height: 120px;
  padding: 0 25px 0 30px;
  margin: 0 auto;
  position: relative;
  .btnEdit {
    background: url(../../assets/shop/btnEdit.png) no-repeat;
    background-size: 100%;
    width: 115px;
    height: 35px;
    color: #000000;
    font-size: 15px;
    text-align: center;
    line-height: 35px;
    position: absolute;
    right: 30px;
    bottom: -17px;
    cursor: pointer;
  }
  .pic {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px;
    margin: 0 0 0 10px;
    position: relative;
    cursor: pointer;
    .sex {
      background: url(../../assets/shop/sex.png) no-repeat;
      background-size: 100%;
      width: 18px;
      height: 19px;
      position: absolute;
      right: 0;
      bottom: 5px;
      z-index: 10;
      &.girl {
        background: url(../../assets/shop/girl.png) no-repeat;
        background-size: 100%;
      }
    }
    img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      border: solid 1px #fff;
    }
  }
  .cont {
    color: #fff;
    padding-left: 25px;
    position: relative;
    padding-top: 10px;
    text-align: left;
    text-align: right;
    .nameuser {
      display: flex;
      justify-content: flex-end;
      align-items: center;
    }
    .icon {
      background: url(../../assets/shop/diamond.png) no-repeat;
      background-size: 100%;
      width: 18px;
      height: 18px;
      display: block;
      font-size: 8px;
      text-align: center;
      line-height: 14px;
      padding-right: 2px;
      margin-right: 5px;
    }
    .name {
      font-size: 18px;
      line-height: 26px;
      font-family: "siyuanM";
      cursor: pointer;
    }
    .tell {
      font-size: 15px;
      line-height: 22px;
      cursor: pointer;
    }
    .title {
      font-size: 15px;
      line-height: 28px;
    }
  }
  .fraction {
    color: #fff;
    .tit-1 {
      white-space: nowrap;
      i {
        font-style: normal;
        font-size: 36px;
        font-family: "DIN";
        font-weight: 600;
        margin-right: 3px;
      }
      font-size: 15px;
    }
  }
}
.classBox {
  width: 100%;
  height: 60px;
  position: relative;
  display: flex;
  margin-top: 50px;
  .classTit {
    flex: 1;
    text-align: center;
    font-size: 18px;
    color: #333333;
    .titCon {
      display: inline-block;
      padding: 0 30px;
      cursor: pointer;
      font-family: "siyuanM";
      position: relative;
      height: 60px;
      line-height: 60px;
      &::before,
      &::after {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        content: "";
        width: 20px;
        height: 50px;
      }
      &::before {
        background: url(../../assets/shop/titbg01.png) no-repeat center center;
        background-size: 100% auto;
        left: 0;
      }
      &::after {
        background: url(../../assets/shop/titbg02.png) no-repeat center center;
        background-size: 100% auto;
        right: 0;
      }
    }
    i {
      display: inline-block;
      height: 100%;
      position: relative;
      font-style: normal;
      font-family: "siyuanM";
    }
    &.active {
      font-size: 18px;
      font-family: "siyuanM";
      color: #2379f7;
      position: relative;
      i {
        &:after {
          position: absolute;
          bottom: -1px;
          width: 100%;
          height: 2px;
          background: #448efb;
          content: "";
          left: 0;
        }
      }
    }
  }
  // &:before{
  //     position:absolute;
  //     bottom:0;
  //     width:100%;
  //     height:1px;
  //     background:#dbe2ee;
  //     content:'';
  // }
}
.list {
  width: calc(100% + 24px);
  margin-left: -12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  font-family: "siyuanN";
  min-height: 200px;
  .shopItem {
    background: #fff;
    width: calc(100% - 24px);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    // padding:2px;
    &:before {
      position: absolute;
      left: 0;
      border-radius: 8px;
      top: 0;
      border: solid 2px #2379f7;
      content: "";
      width: 100%;
      height: 100%;
      opacity: 0;
      transition: all 0.3s;
      z-index: 10;
    }
    &:hover {
      box-shadow: 5px 8px 8px rgba(25, 121, 247, 0.2);
      &:before {
        opacity: 1;
      }
      .btnMore {
        background: #2379f7;
        color: #fff;
        box-shadow: 3px 5px 5px rgba(25, 121, 247, 0.2);
      }
    }
    .imgT {
      width: 100%;
      height: 210px;
      overflow: hidden;
      margin-bottom: 20px;
      img {
        width: 100%;
        height: 100%;
        // width:auto;
        // height:auto;
        object-fit: cover;
      }
    }
    .title {
      font-size: 15px;
      height: 30px;
      padding: 0 10px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      width: 100%;
      line-height: 30px;
      text-align: center;
      position: relative;
      z-index: 99;
    }
    .price {
      color: #2379f7;
      font-size: 26px;
      font-family: "DIN";
      height: 40px;
      i {
        background: url(../../assets/shop/exchange.png) no-repeat left 10px;
        background-size: 27px 27px;
        padding-left: 26px;
        font-style: normal;
      }
      position: relative;
      z-index: 99;
    }
    .btnMore {
      border: solid 1px #2379f7;
      width: 115px;
      height: 35px;
      border-radius: 20px;
      margin: 10px auto 25px;
      color: #2379f7;
      transition: all 0.3s;
      position: relative;
      z-index: 99;
    }
  }
}
.nodata {
  background: url(../../assets/images/nodata2.png) no-repeat center center;
  background-size: 480px 367px;
  width: 100%;
  min-height: 550px;
}
#gotop_xxx {
  position: fixed;
  right: calc((100% - 1200px) / 2 - 55px);
  width: 45px;
  top: 350px;
  z-index: 999999;
}
#gotop_xxx .topList {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: last baseline;
  border: solid 1px #c5d7f2;
  box-shadow: 1px 3px 8px rgba(194, 209, 230, 0.38);
  border-radius: 20px;
  padding: 0 8px;
  height: 93px;
  background: #fff;
}
#gotop_xxx .topList .play {
  background: url(../../assets/shop/play.png) no-repeat;
  background-size: 100%;
  width: 23px;
  height: 24px;
  display: block;
}
#gotop_xxx .topList .btntop {
  background: url(http://img.wireai.com/static/images/icon06.png) no-repeat;
  background-size: 100%;
  width: 23px;
  height: 21px;
  display: block;
}
#gotop_xxx .topBtn:hover .btntop {
  background: url(http://img.wireai.com/static/images/icon05.png) no-repeat;
  background-size: 100%;
}
#gotop_xxx .topList li {
  width: 29px;
  height: 40px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 20px;
  float: right;
  position: relative;
  cursor: pointer;
}
#gotop_xxx .topBtn {
  border-top: solid 2px #e0eaf8;
}
.videoBox {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  .bg {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    position: absolute;
  }
  .close {
    position: absolute;
    left: 50%;
    bottom: 6%;
    transform: translateX(-50%);
    background: url(../../assets/shop/close.png) no-repeat center center;
    background-size: 100%;
    width: 30px;
    height: 31px;
    cursor: pointer;
  }
  .video {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
    width: 60%;
    z-index: 99;
  }
}
@media (max-width: 768px) {
  .addjf {
    display: block;
    .addjfswiper {
      width: 100%;
      transform-origin: top;
      margin-right: 0;
      transform: scale(0.9);
    }
  }
  .jfInfo {
    padding: 50px 0 0 35px;
  }
  .list {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 10px;
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
    .shopItem {
      width: calc(100% - 20px);
      margin: 10px 10px;
      .imgT {
        height: 175px;
        margin-bottom: 10px;
      }
    }
  }
  .userBox {
    margin-top: -20px;
    &::after {
      left: 0;
      top: 25px;
    }
  }
  .userInfo {
    width: 100%;
    background-size: auto 100%;
    padding: 0 20px;
    height: 180px;
    display: block;
    position: relative;
    border-radius: 10px;
    .info {
      width: 100%;
      padding-top: 10px;
      .cont {
        width: 100%;
      }
    }
    .cont {
      text-align: left;
    }
    .score {
      white-space: nowrap;
      position: absolute;
      right: 20px;
      color: #fff;
      font-size: 15px;
      top: 50%;
      transform: translateY(-50%);
      i {
        font-style: normal;
        font-size: 36px;
        font-family: "DIN";
        font-weight: 600;
      }
    }
  }
  .classBox {
    margin-top: 40px;
  }
  header {
    padding: 0 0 0 20px;
    nav {
      padding: 0 10px;
    }
    .title {
      padding: 0 10px;
      font-size: 14px;
    }
  }
  #gotop_xxx {
    right: 10px;
    top: 220px;
  }
  #gotop_xxx .topList {
    &.disable {
      opacity: 0.5;
    }
  }
  .videoBox {
    .video {
      width: 80%;
    }
  }
}

::v-deep .el-loading-mask {
  background: none !important;
}
::v-deep .userBox .el-loading-spinner .path {
  stroke: #fafafa;
}
::v-deep .userBox .el-loading-spinner .el-loading-text {
  color: #fafafa;
}
::v-deep .list .el-loading-spinner .path {
  stroke: #999;
}
::v-deep .list .el-loading-spinner .el-loading-text {
  color: #666;
}
::v-deep .el-image__placeholder {
  background: url(../../assets/shop/loading.gif) no-repeat 50% 50%;
  background-size: 20%;
  width: 100%;
  height: 100%;
}
.rank02con {
  width: 167px;
  min-height: 281px;
  position: relative;
  margin: 0 auto;
  margin-top: 23px;
}
.ranktop {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding-top: 35px;
  .rank01 {
    width: 167px;
    min-height: 281px;
    background: url(../../assets/shop/top2.png) no-repeat center top;
    position: relative;
    margin-top: 36px;
    transition: all 0.5s;
    .hgbz {
      width: 30px;
      height: 29px;
      position: absolute;
      left: 50%;
      margin-left: -10px;
      top: -15px;
      z-index: 2;
    }
    .hgbzimg {
      width: 96px;
      height: 96px;
      overflow: hidden;
      border-radius: 50%;
      position: absolute;
      left: 50%;
      margin-left: -48px;
      top: 8px;
      img {
        width: 100%;
      }
    }
    .rank_sex {
      width: 18px;
      height: 19px;
      position: absolute;
      top: 88px;
      left: 80px;
    }
    .rank_text {
      width: 100%;
      height: auto;
      position: absolute;
      top: 181px;
      text-align: center;
      p {
        font-size: 18px;
        font-weight: bold;
        padding: 5px 0;
        margin: 0;
      }
      span {
        display: block;
        width: 24px;
        height: 2px;
        background: #000000;
        margin: 0 auto;
      }
      .jfnumber {
        color: #2379f7;
        font-family: "DIN";
        font-size: 26px;
        font-weight: bold;
        line-height: 32px;
      }
      .jfspan {
        font-size: 15px;
        color: #666666;
      }
    }
  }
  .rank01:hover {
    margin-top: 0;
  }
  .rank02 {
    width: 262px;
    min-height: 356px;
    background: url(../../assets/shop/top1.png) no-repeat center top;
    transition: all 0.5s;
    position: relative;
    margin: 0 5px;
    margin-top: -23px;
    .hgbz {
      width: 30px;
      height: 29px;
      position: absolute;
      left: 50%;
      margin-left: -10px;
      top: -15px;
      z-index: 2;
    }
    .hgbzimg {
      width: 96px;
      height: 96px;
      overflow: hidden;
      border-radius: 50%;
      position: absolute;
      left: 50%;
      margin-left: -48px;
      top: 8px;
      img {
        width: 100%;
      }
    }
    .rank_sex {
      width: 18px;
      height: 19px;
      position: absolute;
      top: 88px;
      left: 80px;
    }
    .rank_text {
      width: 167px;
      height: auto;
      position: absolute;
      top: 187px;
      text-align: center;
      p {
        font-size: 18px;
        font-weight: bold;
        padding: 5px 0;
        margin: 0;
        padding-top: 35px;
      }
      span {
        display: block;
        width: 24px;
        height: 2px;
        background: #000000;
        margin: 0 auto;
      }
      .jfnumber {
        color: #6f72ff;
        font-family: "DIN";
        font-size: 26px;
        font-weight: bold;
        line-height: 32px;
      }
      .jfspan {
        font-size: 15px;
        color: #666666;
      }
    }
  }
  .rank02:hover {
    margin-top: -46px;
  }
  .rank03 {
    background: url(../../assets/shop/top3.png) no-repeat center top;
    .rank_text {
      .jfnumber {
        color: #1dd2f8;
      }
    }
  }
}
.titlep {
  font-size: 22px;
  color: #2379f7;
  display: flex;
  align-items: center;
  margin: 0 auto;
  justify-content: center;
  letter-spacing: 3px;
}
.rank_headimg {
  width: 100px;
  height: 100%;
  position: relative;
  margin: 0 auto;
}
</style>